package com.pig.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.*;

@Controller
@RequestMapping("/page")
public class PageController {

    @GetMapping("/{pageUrl}")
    public String getPage(@PathVariable String pageUrl) {
        return pageUrl;
    }
    @RequestMapping("/doDetail")
    public String doDetailMenu(Model model, Integer id){
        model.addAttribute("id", id);
        return "details";
    }
}
